package com.example.util;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;
//忽略时间计算
public class DateRangeGenerator {
    public static List<String> generateDateRange(LocalDate start, LocalDate end) {
        List<String> dateRange = new ArrayList<>();
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
        LocalDate currentDate = start;
        while (!currentDate.isAfter(end)) {
            dateRange.add(currentDate.format(formatter));
            currentDate = currentDate.plusDays(1);
        }
        return dateRange;
    }
}